#include <stdio.h>
#include <string.h>

#define LEN 4


int main(void){
    int nums1[LEN] = {10,20,30,40};
    int nums2[LEN];
    //复制数组nums1的每个元素到nums2中
    memcpy(nums2,nums1,LEN*sizeof(nums1[0]));

    nums1[2]=50;

    for (int i = 0; i < LEN; i++){
        printf("%d ",nums2[i]);
    }
    printf("\n");
    

    return 0;
}